package com.gxa.meiye.core.common;

import lombok.extern.slf4j.Slf4j;
import org.springframework.core.convert.converter.Converter;

import java.time.LocalDateTime;

@Slf4j
public class              DateConverter implements Converter<String, LocalDateTime> {
    @Override
    public LocalDateTime convert(String s) {

        try {
            return LocalDateTime.parse(s);
        }catch (Exception e){
            log.error(e.toString());
            throw new RuntimeException("日期转换失败!");
        }

    }
}
